package src.cs2340.todoApp;

/**
 * Location.java 
 * @author Kristian
 * @version 1.10 March 9, 2012
 * Will define the characteristics of a specific place from a Map.
 */
public class Location {
	
	private String tag;
	private int mailboxNum;
	private String streetName;
	private String city;
	private String state;
	private int zipcode;
	
	/**
	 * Constructor.
	 * @param mailboxNum The mailbox number of the place.
	 * @param streetName The name of the street at which this place exists.
	 * @param city The city in which the location exists.
	 * @param state The state (eg. Georgia, California, etc.) in which the location exists.
	 * @param country The country in which the location exists.
	 * @param zipcode The zipcode of the general area in which the location exists.
	 */
	public Location(String tag, int mailboxNum, String streetName, String city, String state,
			int zipcode)
	{
		this.tag = tag;
		this.mailboxNum = mailboxNum;
		this.streetName = streetName;
		this.city = city;
		this.state = state;
		this.zipcode = zipcode;
	}
	
	/**
	 * A getter for mailboxNum.
	 * @return mailboxNum
	 */
	public int getMailboxNum()
	{
		return mailboxNum;
	}
	
	/**
	 * A setter for mailboxNum.  Replaces the mailboxNumber of the location with
	 * the one in the parameter.
	 * @param mailboxNum The new mailboxNum of the Location. 
	 */
	public void setMailboxNum(int mailboxNum)
	{
		this.mailboxNum = mailboxNum;
	}
	
	/**
	 * A getter for streetName.
	 * @return streetName
	 */
	public String getStreetName()
	{
		return streetName;
	}
	
	/**
	 * A setter for streetName.  Replaces the streetName of the location with
	 * the one in the parameter.
	 * @param streetName The new streetName of the location.
	 */
	public void setStreetName(String streetName)
	{
		this.streetName = streetName;
	}
	
	/**
	 * A getter for city.
	 * @return city
	 */
	public String getCity()
	{
		return city;
	}
	
	/**
	 * A setter for city.  Replaces the city of the location with the
	 * one in the parameter.
	 * @param city The new city in which the location exists.
	 */
	public void setCity(String city)
	{
		this.city = city;
	}
	
	/**
	 * A getter for state.
	 * @return state
	 */
	public String getState()
	{
		return state;
	}
	
	/**
	 * A setter for state.  Replaces the state of the location with the
	 * one in the parameter.
	 * @param state The new state in which the location exists.
	 */
	public void setState(String state)
	{
		this.state = state;
	}
	
	/**
	 * A getter for zipcode.
	 * @return zipcode
	 */
	public int getZipcode()
	{
		return zipcode;
	}
	
	/**
	 * A setter for zipcode.  Replaces teh zipcode of the location with the
	 * one in the parameter.
	 * @param zipcode The new zipcode in which the location exists.
	 */
	public void setZipCode(int zipcode)
	{
		this.zipcode = zipcode;
	}
	
	public String getAddress(){
		return mailboxNum + " " + streetName + " " + city + " " + state + " " + zipcode;
	}
	
	@Override
	public String toString(){
		return tag;
	}
}
